package org.example.entity;

import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Objects;

@Document("apiHistory")
public class ApiHistory {
	private String id;

	public ApiHistory(String id, Integer uid, String inputFileId, String outputFileId, String status) {
		this.id = id;
		this.uid = uid;
		this.inputFileId = inputFileId;
		this.outputFileId = outputFileId;
		this.status = status;
	}

	private Integer uid;
	private String inputFileId;
	private String outputFileId;
	private String status;

	public ApiHistory() {
	}

	@Override
	public String toString() {
		return "ApiHistory{" +
				"id='" + id + '\'' +
				", uid=" + uid +
				", inputFileId='" + inputFileId + '\'' +
				", outputFileId='" + outputFileId + '\'' +
				", status='" + status + '\'' +
				'}';
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}
		ApiHistory that = (ApiHistory) o;
		return Objects.equals(id, that.id) && Objects.equals(uid, that.uid) && Objects.equals(inputFileId, that.inputFileId) && Objects.equals(outputFileId, that.outputFileId) && Objects.equals(status, that.status);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, uid, inputFileId, outputFileId, status);
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Integer getUid() {
		return uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	public String getInputFileId() {
		return inputFileId;
	}

	public void setInputFileId(String inputFileId) {
		this.inputFileId = inputFileId;
	}

	public String getOutputFileId() {
		return outputFileId;
	}

	public void setOutputFileId(String outputFileId) {
		this.outputFileId = outputFileId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
